/**
 * @author Manu Francis Mathew
 * Initially develop this as application client.
 * Later step when I support applet, then I should make necessary modification
 * Also this comment to be modified.
 * Version1...when moer 1d,2d,3d frames are added, this will be enhanced many times over
 */

package sa.exercises.hundred;

import sa.exercises.one.MaximumStressFunctions;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JButton;
import javax.swing.JList;
import javax.swing.JComboBox;
import javax.swing.JTextField;
import javax.swing.JTextArea;
import javax.swing.JTabbedPane;
import javax.swing.JPanel;
import java.awt.GridLayout;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.event.WindowListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowAdapter;


class MaximumStressCalculatorGUI extends JFrame
{

	
	//MaximumStressFunctions msc;
	JPanel p,pTopLeft,pTopRight,pResultBottom;
	JLabel jl;
	JComboBox members,endConditions,loadTypes;
	JTabbedPane loadDetailsInput;
	JTextArea jta_test;
	JTextField jtf_test;
	
		


	public MaximumStressCalculatorGUI()
	{
		p = new JPanel();
                pTopLeft = new JPanel(); //input/select load,member conditions etc
                pTopRight = new JPanel(); //display image,input loads,dimensions etc
                pResultBottom = new JPanel(); //LoadConditionsTab
                p.setLayout(new GridLayout(1,2));
		//jl = new JLabel("J for Jesus, J for Java ,  C for Christ C for C,C++,Csharp");
                p.setLayout(new GridLayout(2,1));
       		loadDetailsInput = new JTabbedPane();
                loadDetailsInput.add("Structural Member & Load Type & End Conditions",pTopLeft);
                loadDetailsInput.add("Load Value(s) & Linear Dimensions",pTopRight);
                pResultBottom = new JPanel();
                p.add(loadDetailsInput);
       		p.add(pResultBottom);
		getContentPane().add(p);
		//p.add(jl);
		String[] data1 = {".....","BEAM","COLUMN","ARCH"};
		members = new JComboBox(data1);
		pTopLeft.add(members);
		String[] data2 = {".....","CANTILEVER", "SIMPLY SUPPORTED", "FIXED"};
		endConditions= new JComboBox(data2);
		pTopLeft.add(endConditions);
		String[] data3 = {".....","POINT LOAD","POINT LOADS","UDL"};
		loadTypes= new JComboBox(data3);
		pTopLeft.add(loadTypes);
                				
		
	}

	public static void main(String args[])
	{
		MaximumStressCalculatorGUI mscg=new MaximumStressCalculatorGUI();
		mscg.setTitle("MaximumStressCalculator");
		WindowListener l = new WindowAdapter() {
				public void windowClosing(WindowEvent e) {
       				System.exit(0);
     			}
  		};
		mscg.addWindowListener(l);
		mscg.pack();
		mscg.setVisible(true);
		//mscg.show();
		
	}
}
